<?php
class PNSubCategory extends PNObjectEx {
  function PNSubCategory($init=null, $where='')
  {
    $this->PNObject();

    $this->_objType       = 'icarrent_subcategory';
    $this->_objField      = 'id';
    $this->_objPath       = 'form';

    $this->_init($init, $where);
  }
  function validate(){
    $form = FormUtil::getPassedValue ('form', false);
    if (empty($form['name'])){
      $message[] = 'field name must not be empty.';
      $this->setError($message);
      return false;
    }
    $this->clearError();
    return true;
  }

}